WebInput.NET calculator editor has client side events model. Every client side event handler at least has 1 parameter (controlId).
In this topic, you will learn how to use calculator editor client side events in WebInput.
To use WebInput calculator editor events
- Drag WebInput instance to WebForm.
- Go to WebInput CalculatorEditorClientSideEvents property.
- Add WebInput1_OperandOnClick to OnClick event in OperandEvents.
- Add WebInput1_OperatorOnClick to OnClick event in OperatorEvents.
- In client side, add WebInput1_OperandOnClick function and put the following code:
JavaScript Copy Code
function WebInput1_OperandOnClick(controlId) { alert("Operand key is triggered");
}
- In client side add WebInput1_OperatorOnClick function and put the following code:
JavaScript Copy Code
function WebInput1_OperatorOnClick(controlId) { alert("Operator key is triggered");
}
- Compile and run the Project.